local zhangdeng = fk.CreateSkill {
  name = "zhangdeng&",
}

zhangdeng:addEffect("viewas", {
  prompt = "#zhangdeng-active",
  pattern = "analeptic",
  card_filter = Util.FalseFunc,
  before_use = function(self, player)
    local room = player.room
    for _, p in ipairs(room.alive_players) do
      room:addPlayerMark(p, "zhangdeng_used-turn")
    end
  end,
  view_as = function(self, cards)
    local c = Fk:cloneCard("analeptic")
    c.skillName = "zhangdeng"
    return c
  end,
  enabled_at_play = function (self, player)
    return not player.faceup and not table.every(Fk:currentRoom().alive_players, function (p)
      return not p:hasSkill("zhangdeng") or p.faceup
    end)
  end,
  enabled_at_response = function (self, player, response)
    return not response and not player.faceup and  not table.every(Fk:currentRoom().alive_players, function (p)
      return not p:hasSkill("zhangdeng") or p.faceup
    end)
  end,
})

return zhangdeng